package nml.mail.reg.await;


import nml.mail.reg.Reg;

import org.openqa.selenium.By;
//import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class  aol_com extends Reg{

	public void reg(String username, String password) {		
		

		String url = "https://new.aol.com/productsweb/?promocode=825349";
		get(url);
		
		dr.findElement(By.name("{actionForm.firstName}")).sendKeys("Tick");
		dr.findElement(By.name("{actionForm.lastName}")).sendKeys("Tock");
		dr.findElement(By.name("{actionForm.desiredSN}")).click();
		
		sleep(5000);
		
		dr.findElement(By.name("{actionForm.desiredSN}")).sendKeys(username);
		
		dr.findElement(By.cssSelector("#check-avail-butt span")).click();
		
		
		dr.findElement(By.name("{actionForm.password}")).sendKeys(password);
		dr.findElement(By.name("{actionForm.verifyPassword}")).sendKeys(password);
		
		dr.findElement(By.id("step-one")).click();
		
		sleep(5000);
		
		dr.findElement(By.id("arrowImg")).click();
		
		sleep(3000);
		dr.findElement(By.id("tab0")).click();
		
		
		dr.findElement(By.name("{actionForm.dobDay}")).sendKeys("21");

		dr.findElement(By.name("{actionForm.dobYear}")).sendKeys("1981");
		
		dr.findElement(By.name("wlw-radio_button_group_key:{actionForm.gender}")).click();
		
		dr.findElement(By.name("{actionForm.zipCode}")).sendKeys("34322");
		
		dr.findElement(By.cssSelector("#asq-toggle-sect .first")).click();
		
		sleep(3000);
		dr.findElement(By.cssSelector("#asq-toggle-sect #tab0")).click();
		
		
		dr.findElement(By.name("{actionForm.acctSecurityAnswer}")).sendKeys("168");
		
		sleep(3000);
		
		dr.findElement(By.cssSelector(".stepTwo .ltbtnedge")).click();

		
		System.out.println(username+"@aol.com\t"+password);
		
	}

	public static void main(String[] args) {
		new aol_com().reg("cmdchina1231", "sfd239234sdl0238");
	}
	
	
}
